/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  Alert
} from 'react-native';

var Header = require("./Header");
var Button = require('rn-bootstrap-buttons');
var _navigator;
class Main extends Component {
	constructor(props) {  
		super(props);
		_navigator = this.props.navigator;
		var dd = ["1","2","3","4"];
		dd.splice(0,1);
		console.log(dd);
  	}

	render() {
	    return (
	      	<View style={styles.container}>
	      		<Header name="关于" IconLeft="chevron-left" onPressLeft={()=>_navigator.pop()}/>
	      		<View style={{flex:1,justifyContent: 'center',alignItems: 'center'}}>
	      			<View style={{flex:1,justifyContent: 'center',alignItems: 'center'}}>
	      				<Image source={require("./../image/common/logo-1.png")} style={{width:150,height:150}}/>
	      				<Text>软件版本:1.0</Text>
	      				<View style={{marginTop:100}}>
	      					<Button onPress={()=>Alert.alert("已经是最新版本")} buttonType="secondaryOutline" style={styles.button}>      检查新版本      </Button>
	      				</View>
	      			</View>
	      		</View>
	      		<View style={{marginBottom:10}}>
	      			<Text style={{color:'blue',textDecorationLine:'underline'}}>用户协议及隐私政策</Text>
	      		</View>
	      	</View>
	    );
	}
}

const styles = StyleSheet.create({
	container: {
	    flex: 1,
	    justifyContent: 'center',
	    alignItems: 'center',
	    backgroundColor: '#F5FCFF',
	},
	button:{
		width:200,
		marginTop:30
	}
});

module.exports = Main;
